package com.jeegit.ecms.domain;

import java.math.BigDecimal;
import java.util.List;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.jeegit.common.annotation.Excel;
import com.jeegit.common.core.domain.BaseEntity;

/**
 * 视频清单对象 cms_video_items
 * 
 * @author jeegit
 * @date 2022-07-02
 */
public class CmsVideoItems extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    private Long id;

    /** 视频章节主键 */
    @Excel(name = "视频章节主键")
    private Long cmsVideoChapterId;
    
    private String cmsVideoChapterName;
    
    /** 视频章节主键 */
    private List<CmsVideoChapter> listChapters;

    /** 视频编码 */
    @Excel(name = "视频编码")
    private Long cmsVideoId;

    /** 标题 */
    @Excel(name = "标题")
    private String title;

    /** 视频时长 */
    @Excel(name = "视频时长")
    private String videoTimes;

    /** 试听 */
    @Excel(name = "试听")
    private String dictIsAudition;

    /** 简介 */
    @Excel(name = "简介")
    private String description;

    /** 视频 */
    @Excel(name = "视频")
    private String video;

    /** 内容 */
    @Excel(name = "内容")
    private String content;

    /** 视频密钥 */
    @Excel(name = "视频密钥")
    private String encKey;

    /** 加密向量 */
    @Excel(name = "加密向量")
    private String encIv;

    
    public void initIsBuy(CmsVideoItems cmsVideoItems,Boolean isBuy) {
	if(!"1".equals(dictIsAudition)&&!isBuy) {
	    cmsVideoItems.setVideo("");//视频
	    cmsVideoItems.setContent("");//内容
	    cmsVideoItems.setEncIv("");//视频密钥
	    cmsVideoItems.setEncIv("");//加密向量
	}
	
    }
    
    /** 视频状态（1 未上传 2 已上传 3 转码中 4 分片加密 5 oss 存储 6 cdn 加速） */
    @Excel(name = "视频状态", readConverterExp = "1=,未=上传,2=,已=上传,3=,转=码中,4=,分=片加密,5=,o=ss,存=储,6=,c=dn,加=速")
    private String videoStatus;

    /** 排序 */
    @Excel(name = "排序")
    private BigDecimal sort;

    /** 状态（0正常 1删除 2停用） */
    @Excel(name = "状态", readConverterExp = "0=正常,1=删除,2=停用")
    private String status;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setCmsVideoChapterId(Long cmsVideoChapterId) 
    {
        this.cmsVideoChapterId = cmsVideoChapterId;
    }

    public Long getCmsVideoChapterId() 
    {
        return cmsVideoChapterId;
    }
    public void setCmsVideoId(Long cmsVideoId) 
    {
        this.cmsVideoId = cmsVideoId;
    }

    public Long getCmsVideoId() 
    {
        return cmsVideoId;
    }
    public void setTitle(String title) 
    {
        this.title = title;
    }

    public String getTitle() 
    {
        return title;
    }
    public void setVideoTimes(String videoTimes) 
    {
        this.videoTimes = videoTimes;
    }

    public String getVideoTimes() 
    {
        return videoTimes;
    }
    public void setDictIsAudition(String dictIsAudition) 
    {
        this.dictIsAudition = dictIsAudition;
    }

    public String getDictIsAudition() 
    {
        return dictIsAudition;
    }
    public void setDescription(String description) 
    {
        this.description = description;
    }

    public String getDescription() 
    {
        return description;
    }
    public void setVideo(String video) 
    {
        this.video = video;
    }

    public String getVideo() 
    {
        return video;
    }
    public void setContent(String content) 
    {
        this.content = content;
    }

    public String getContent() 
    {
        return content;
    }
    public void setEncKey(String encKey) 
    {
        this.encKey = encKey;
    }

    public String getEncKey() 
    {
        return encKey;
    }
    public void setEncIv(String encIv) 
    {
        this.encIv = encIv;
    }

    public String getEncIv() 
    {
        return encIv;
    }
    public void setVideoStatus(String videoStatus) 
    {
        this.videoStatus = videoStatus;
    }

    public String getVideoStatus() 
    {
        return videoStatus;
    }
    public void setSort(BigDecimal sort) 
    {
        this.sort = sort;
    }

    public BigDecimal getSort() 
    {
        return sort;
    }
    public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }
    
    
    
    

    public List<CmsVideoChapter> getListChapters() {
		return listChapters;
	}

	public void setListChapters(List<CmsVideoChapter> listChapters) {
		this.listChapters = listChapters;
	}

	public String getCmsVideoChapterName() {
		return cmsVideoChapterName;
	}

	public void setCmsVideoChapterName(String cmsVideoChapterName) {
		this.cmsVideoChapterName = cmsVideoChapterName;
	}

	@Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("cmsVideoChapterId", getCmsVideoChapterId())
            .append("cmsVideoId", getCmsVideoId())
            .append("title", getTitle())
            .append("videoTimes", getVideoTimes())
            .append("dictIsAudition", getDictIsAudition())
            .append("description", getDescription())
            .append("video", getVideo())
            .append("content", getContent())
            .append("encKey", getEncKey())
            .append("encIv", getEncIv())
            .append("videoStatus", getVideoStatus())
            .append("sort", getSort())
            .append("status", getStatus())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
